package com.example.pc.greenplants;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class LanPenHuaActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lan_pen_hua);

        //隐藏标题栏
        ActionBar actionBar = getSupportActionBar();
        if (actionBar!=null){
            actionBar.hide();
        }

        Button button1 = (Button) findViewById(R.id.button);
        Button button2 = (Button) findViewById(R.id.button2);
        Button button3 = (Button) findViewById(R.id.button3);
        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://baike.baidu.com/item/蓝盆花"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://www.baidu.com/sf?pd=video_page&sign=3189961804357862935&word=%E8%93%9D%E7%9B%86%E8%8A%B1%E5%85%BB%E6%AE%96%E8%A7%86%E9%A2%91&oword=%E8%93%9D%E7%9B%86%E8%8A%B1%E5%85%BB%E6%AE%96%E8%A7%86%E9%A2%91&title=%E4%B8%80%E5%88%86%E9%92%9F%E4%BA%86%E8%A7%A3%E2%80%94%E2%80%94%E5%8D%8E%E5%8C%97%E8%93%9D%E7%9B%86%E8%8A%B1&atn=index&alr=1&openapi=1&resource_id=5052&frsrcid=4185&cambrian_id=1603123833821926&sp=0&ext=%7B%22src%22%3A%22http%3A%5C%2F%5C%2Fvdse.bdstatic.com%5C%2F%5C%2Fa406c93403b340b925fbdc48b3e38a42%3Fauthorization%3Dbce-auth-v1%252Ffb297a5cc0fb434c971b8fa103e8dd7b%252F2017-05-11T09%253A02%253A31Z%252F-1%252F%252Ff7554b126f3912fa5582be22511ba182e7f6eee67315a87eed858f72c75f0b67%22%2C%22loc%22%3A%22http%3A%5C%2F%5C%2Fxzh.aivideo.baidu.com%5C%2Fshortvideo%5C%2F2fd1685272151b5f0923997cd043b5ccd.html%22%2C%22log_loc%22%3A%22http%3A%5C%2F%5C%2Fxzh.aivideo.baidu.com%5C%2Fshortvideo%5C%2F2fd1685272151b5f0923997cd043b5ccd.html%22%2C%22duration%22%3A%2253%22%2C%22poster%22%3A%22http%253A%252F%252Ft11.baidu.com%252Fit%252Fu%253D2644942453%252C749055071%2526fm%253D171%2526app%253D20%2526f%253DJPEG%253Fw%253D640%2526h%253D360%2526s%253DC41330D6160A294170B44645030070F4%22%2C%22source%22%3A%22%5Cu79d2%5Cu61c2%5Cu767e%5Cu79d1%22%2C%22s%22%3A%224fc5a291ae508fd21bb2c993d2c599d2%22%2C%22isHttps%22%3A1%2C%22isCompilation%22%3Anull%2C%22jsy%22%3A1%7D&top=%7B%22sfhs%22%3A1%2C%22_hold%22%3A2%7D&fr=1"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });


        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://list.tmall.com/search_product.htm?q=%C0%B6%C5%E8%BB%A8%BB%A8%C3%E7&type=p&spm=a220m.1000858.a2227oh.d100&from=.list.pc_1_searchbutton"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

    }
}
